<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="shared/css_js::header">
	<title>jQuery WeUI</title>
	<link rel="stylesheet" type="text/css" href="/static/css/weuicss/weui.min.css"/>
</head>
<body>


<header class="mui-bar mui-bar-nav">
	<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title"><font size="4"><b>订单详情</b></font></h1>
</header>

<div class="mui-content">
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<!--<div class="weui-cell" style="line-height:2">
			<div class="weui-cell__hd"><i class="fa fa-money fa-lg" style="color: black;padding-top: 5px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<p style="color: red">待付款</p>
			</div>
			<div class="weui-cell__ft"></div>
		</div>-->
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__hd"><i class="fa fa-warning fa-lg" style="color: red;padding-top: 5px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<h4 class="weui-media-box__title" style="font-size: 18px">您的工单状态为:<span th:text="${orderdetail.ordertype}"></span></h4>
			</div>
			<div class="weui-cell__ft"></div>
		</div>
	</div>
	<div class="weui-cells__title"></div><!--间隔一下-->
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__bd">
				<div class="weui-flex">
					<div class="weui-flex__item" style="flex-grow: 2">
						<p style="margin-bottom: 0px" >订单编号:&nbsp;&nbsp;<span th:text="${orderdetail.oid}"></span></p>
					</div>
					<div class="weui-flex__item" style="flex-grow: 1">
						<p style="margin-bottom: 0px" >服务顾问:&nbsp;&nbsp;<span th:text="${orderdetail.staffname}"></span></p>
					</div>
				</div>
			</div>
		</div>
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__bd">
				<p style="margin-bottom: 0px" >订单时间:&nbsp;&nbsp;<span th:text="${orderdetail.cometime}"></span></p>
			</div>
		</div>
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__hd"><i class="fa fa-building fa-lg" style="color: black;padding-top: 5px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<h4 style="margin-bottom: 0px" >服务门店:&nbsp;&nbsp;<span th:text="${orderdetail.chnname}"></span></h4>
			</div>
		</div>
	</div>
	<div class="weui-cells__title"></div><!--间隔一下-->
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
	<div class="weui-cell" style="line-height:1">
		<div class="weui-cell__hd"><i class="fa fa-handshake-o fa-lg" style="color: black;padding-top: 5px"></i>&nbsp;&nbsp;</div>
		<div class="weui-cell__bd">
			<h4 style="margin-bottom: 0px" >服务项目</h4>
		</div>
	</div>
</div>
	<ul class="mui-table-view">
		<li class="mui-table-view-cell mui-media" style="line-height: 2">
			<a href="#" th:each="service: ${orderservices}">
				<div class="weui-flex">
					<div class="weui-flex__item" style="flex-grow: 8">
						<img class="mui-media-object mui-pull-left" style="width: 60px;height: 50px" src="http://dcloudio.github.io/mui/assets/img/shuijiao.jpg"/>
						<div class="mui-media-body" style="white-space: normal">
							<p th:text="${service.servitemname}"></p>
						</div>
					</div>
					<div class="weui-flex__item" style="flex-grow: 1">
						<h4 th:text="${'￥'+service.wtfee}"></h4>
						<p class="mui-pull-right">x 1</p>
					</div>
				</div>
			</a>
		</li>
	</ul>
	<div class="weui-cells__title"></div><!--间隔一下-->
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__hd"><i class="fa fa-cubes fa-lg" style="color: black;padding-top: 5px"></i>&nbsp;&nbsp;</div>
			<div class="weui-cell__bd">
				<h4 style="margin-bottom: 0px" >材料</h4>
			</div>
		</div>
	</div>
	<ul class="mui-table-view">
		<li class="mui-table-view-cell mui-media" style="line-height: 2">
			<a href="#" th:each="metinfo:${ordermetinfo}">
				<div class="weui-flex">
					<div class="weui-flex__item" style="flex-grow: 8">
						<img class="mui-media-object mui-pull-left" style="width: 60px;height: 50px" src="http://dcloudio.github.io/mui/assets/img/shuijiao.jpg"/>
						<div class="mui-media-body" style="white-space: normal">
							<p th:text="${metinfo.mname}"></p>
						</div>
					</div>
					<div class="weui-flex__item" style="flex-grow: 1">
						<h4 th:text="${'￥'+metinfo.saleamount}"></h4>
						<p class="mui-pull-right" th:text="${'x'+metinfo.metecount}"></p>
					</div>
				</div>
			</a>
		</li>
	</ul>
	<div class="weui-cells__title"></div><!--间隔一下-->
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__bd">
				<p style="margin-bottom: 0px" >订单应收:
					<span class="mui-pull-right">&nbsp;&nbsp;<font size="4" style="color: orangered" th:text="${'￥'+orderdetail.planfee}"></font></span>
				</p>
			</div>
		</div>
	</div>
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__bd">
				<p style="margin-bottom: 0px" >优惠:
					<span class="mui-pull-right">&nbsp;&nbsp;<font size="4" style="color: orangered" th:text="${'￥'+(orderdetail.planfee-orderdetail.realfee)}" th:id="allacount">￥0</font></span>
				</p>
			</div>
		</div>
	</div>
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__bd">
				<p style="margin-bottom: 0px" >套餐优惠:
					<span class="mui-pull-right">&nbsp;&nbsp;<font size="4" style="color: orangered" th:if="${orderdetail.tcdisc!=null}" th:text="${'￥'+orderdetail.tcdisc}" th:id="tcdisc">￥0</font></span>
					<span class="mui-pull-right">&nbsp;&nbsp;<font size="4" style="color: orangered" th:if="${orderdetail.tcdisc==null}" th:id="tcdisc">￥0</font></span>
				</p>
			</div>
		</div>
	</div>
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__bd">
				<p style="margin-bottom: 0px" >会员卡优惠:
					<span class="mui-pull-right">&nbsp;&nbsp;<font size="4" style="color: orangered" th:if="${orderdetail.tckdisc!=null}" th:text="${'￥'+orderdetail.tckdisc}" th:id="tckdisc">￥0</font></span>
					<span class="mui-pull-right">&nbsp;&nbsp;<font size="4" style="color: orangered" th:if="${orderdetail.tckdisc==null}" th:id="tckdisc">￥0</font></span>
				</p>
			</div>
		</div>
	</div>
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__bd">
				<p style="margin-bottom: 0px" >其他优惠:
					<span class="mui-pull-right">&nbsp;&nbsp;<font size="4" style="color: orangered" th:id="other"></font></span>
				</p>
			</div>
		</div>
	</div>
	<div class="weui-cells weui-cell_access" style="margin-top: 0px">
		<div class="weui-cell" style="line-height:1">
			<div class="weui-cell__bd">
				<div class="weui-flex">
					<div >
						<h4 >订单实收:&nbsp;&nbsp;<font size="4" style="color: orangered" th:text="${'￥'+orderdetail.realfee}"></font></h4>
					</div>
					<div >
						<button class="mui-btn mui-btn-negative mui-pull-right" th:if="${orderdetail.stat==7||orderdetail.stat==8}" style="margin-left: 70px;height: 45px">去支付</button>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="weui-cells__title" align="center">没有再多内容啦</div><!--没有再多内容啦-->

</div>

</body>
<script>
    $(document).ready(function() {
        var allacount=$("#allacount").text();
        var tcdisc=$("#tcdisc").text();
        var tckdisc=$("#tckdisc").text();
        var ontheracount=allacount.substr(1)-tcdisc.substr(1)-tckdisc.substr(1);
        $("#other").text("￥"+ontheracount);
    });
</script>
</html>
